Skip to content

feat(socket-mode): support undici v8 as a peer dependency - #2694

Open
WilliamBergamin wants to merge 9 commits into
mainfrom
expand-undici-support
Open

feat(socket-mode): support undici v8 as a peer dependency#2694
WilliamBergamin wants to merge 9 commits into
mainfrom
expand-undici-support

Conversation

@WilliamBergamin

@WilliamBergamin WilliamBergamin commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Summary

Expand @slack/socket-mode to support both undici@^7 and undici@^8 as a peer dependency.

  • Widen peerDependencies.undici to ^7.0.0 || ^8.0.0. The source needs no logic changes
  • CI now pairs each Node version with an undici major via a versions: [{ node, undici }] matrix and forces the socket-mode workspace onto that major before running the suite.

Requirements

Widen the `undici` peer dependency range to `^7.0.0 || ^8.0.0` so consumers
can bring either major. undici v8 requires Node >=22.19, while v7 continues to
support Node >=20 — the source needs no changes, as v8 preserves every API
socket-mode uses.

CI now pairs each Node version with an undici major via a `versions` matrix
and forces the socket-mode workspace onto that major before running the suite,
so v8 support is actually exercised on capable Node versions. A new guardrail
test asserts the Node/undici pairing (and never allows v8 on Node <22.19).

Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
@changeset-bot

changeset-bot Bot commented Aug 10, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: c0746b2

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@slack/socket-mode Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

WilliamBergamin and others added 2 commits August 10, 2026 14:38
Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
@codecov

codecov Bot commented Aug 10, 2026

Copy link
Copy Markdown

❌ 2 Tests Failed:

Tests completed Failed Passed Skipped
768 2 766 0
View the top 2 failed test(s) by shortest run time
test::never runs undici v8+ on Node older than 22
Stack Traces | 0.00248s run time
Error [ERR_TEST_FAILURE]: undici@8.10.1 requires Node >=22, but tests are running on Node 24.19.0
    at new Promise (<anonymous>)
    at Array.map (<anonymous>) {
  code: 'ERR_TEST_FAILURE',
  failureType: 'testCodeFailure',
  cause: AssertionError [ERR_ASSERTION]: undici@8.10.1 requires Node >=22, but tests are running on Node 24.19.0
      at TestContext.<anonymous> (D:\a\node-slack-sdk\node-slack-sdk\packages\socket-mode\src\undiciVersion.test.ts:15:12)
      at Test.runInAsyncScope (node:async_hooks:227:14)
      at Test.run (node:internal/test_runner/test:1382:25)
      at Test.start (node:internal/test_runner/test:1242:17)
      at node:internal/test_runner/test:1867:71
      at node:internal/per_context/primordials:504:82
      at new Promise (<anonymous>)
      at new SafePromise (node:internal/per_context/primordials:478:3)
      at node:internal/per_context/primordials:504:9
      at Array.map (<anonymous>) {
    generatedMessage: false,
    code: 'ERR_ASSERTION',
    actual: false,
    expected: true,
    operator: '==',
    diff: 'simple'
  }
}
undici peer dependency::never runs undici v8+ on Node older than 22
Stack Traces | 0.00289s run time
Error [ERR_TEST_FAILURE]: undici@8.10.1 requires Node >=22, but tests are running on Node 26.8.1
    at new Promise (<anonymous>)
    at Array.map (<anonymous>) {
  code: 'ERR_TEST_FAILURE',
  failureType: 'testCodeFailure',
  cause: AssertionError [ERR_ASSERTION]: undici@8.10.1 requires Node >=22, but tests are running on Node 26.8.1
      at TestContext.<anonymous> (D:\a\node-slack-sdk\node-slack-sdk\packages\socket-mode\src\undiciVersion.test.ts:15:12)
      at Test.runInAsyncScope (node:async_hooks:226:14)
      at Test.run (node:internal/test_runner/test:1402:25)
      at Test.start (node:internal/test_runner/test:1262:17)
      at node:internal/test_runner/test:1903:71
      at node:internal/per_context/primordials:504:82
      at new Promise (<anonymous>)
      at new SafePromise (node:internal/per_context/primordials:478:3)
      at node:internal/per_context/primordials:504:9
      at Array.map (<anonymous>) {
    generatedMessage: false,
    code: 'ERR_ASSERTION',
    actual: false,
    expected: true,
    operator: '==',
    diff: 'simple'
  }
}

To view more test analytics, go to the Test Analytics Dashboard
📋 Got 3 mins? Take this short survey to help us improve Test Analytics.

@WilliamBergamin WilliamBergamin self-assigned this Aug 10, 2026
@WilliamBergamin WilliamBergamin added tests M-T: Testing work only dependencies Pull requests that update a dependency file labels Aug 10, 2026
@WilliamBergamin
WilliamBergamin requested a review from zimeg August 10, 2026 18:58
@WilliamBergamin
WilliamBergamin marked this pull request as ready for review August 10, 2026 18:58
@WilliamBergamin
WilliamBergamin requested a review from a team as a code owner August 10, 2026 18:58
@WilliamBergamin WilliamBergamin added this to the socket-mode@next milestone Aug 10, 2026
WilliamBergamin and others added 3 commits August 10, 2026 15:14
Reduce the undici peer-dependency test to its two assertions, drop the
comment essays and the general-purpose version-comparison helper in favor
of a plain Node major check, and rename SOCKET_MODE_EXPECT_UNDICI_MAJOR to
SOCKET_MODE_UNDICI_VERSION.

Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
@WilliamBergamin

Copy link
Copy Markdown
Contributor Author

@zimeg I'll need to update the status checks if we want to merge this

@zimeg zimeg left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@WilliamBergamin LGTM! I'm bummed CI wasn't calling this out with regular installations but this is a good fix to include.

🧪 Longterm I'm worried about testing compatible dependencies with unit tests but let's get this merged to address an issue!

Comment thread packages/socket-mode/src/undiciVersion.test.ts Outdated
},
"peerDependencies": {
"undici": "^7.0.0"
"undici": "^7.0.0 || ^8.0.0"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 praise: Thanks for keeping support consistent!

Co-authored-by: Eden Zimbelman <eden.zimbelman@salesforce.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file tests M-T: Testing work only

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants